import React from 'react';
import { inject, observer } from 'mobx-react';
import { WeaLocaleProvider } from 'ecCom';

const getLabel = WeaLocaleProvider.getLabel;

@inject('crmPortalStore')
@observer
export default class CrmE9HeaderRight extends React.Component {
  componentDidMount() {

  }

  render() {
    const crmPortalStore = this.props.crmPortalStore;
    const { welcomeInfo } = crmPortalStore;
    return (
      <div className="crm-e9header-right">
        <div className="crm-e9header-top-menu-right crm-e9header-toolbar-item">
          <li className="wevicon wevicon-account-logout" style={{ cursor: 'pointer' }} title={getLabel(1205, '退出')} onClick={() => { crmPortalStore.onLogout(); }} />
        </div>
        <div className="crm-e9header-top-menu-right crm-e9header-toolbar-item">
          <li className="wevicon wevicon-account-password" style={{ cursor: 'pointer' }} title={getLabel(17993, '修改密码')} onClick={() => { crmPortalStore.onPasswordClick(); }} />
        </div>
        <div className="crm-e9header-top-menu-right">
          {welcomeInfo}
        </div>
      </div>
    );
  }
}
